<?php 

 /* @var $this Zend_View */
 
echo 'Akcja test';

/*
string|array $name If a string, the element name.  If an array, all other parameters are ignored, and the array elements
are extracted in place of added parameters.

     * @param mixed $value The element value.
     * @param array $attribs Attributes for the element tag. np. checked lub id
     * @return string The element XHTML.
*/
     
    // '1' and '0' as checked/unchecked options; not checked
    // fajnie to jest zrobione bo odrazu wypisuje zwraca checboxa i hiddena jak nie zaznaczy to 
    // wysyka hiddena o wartosci 0 a jak zaznaczy to czekbox przyslania hiddena i wysyla 1
    // podstawowym parametrem to oczywiscie name=foo
    echo $this->formCheckbox('foo');
     
    
    // '1' and '0' as checked/unchecked options; checked
    echo $this->formCheckbox('foo', null, array('checked' => true, 'id'=>'check_test'));
     
    // 'bar' and '0' as checked/unchecked options; not checked
    echo $this->formCheckbox('foo', 'bar');
     
    // 'bar' and 'baz' as checked/unchecked options; unchecked
    echo $this->formCheckbox('foo', null, null, array('bar', 'baz'));
     
    #######################################################################
    
        echo $this->formImage(
        'foo',
        'bar',
        array(
            'src' => 'images/button.png',
            'alt' => 'Button',
        )
    );
    // Output: <input type="image" name="foo" id="foo" src="images/button.png" value="bar" alt="Button" />
    
    
    ###############################################
    echo'<br><br><br>';
    
    // Using options for label elements:
echo $this->formMultiCheckbox(
    'foo',
    2,
    array(
        'label_placement' => 'prepend',
        'label_class'     => 'baz',
    ),
    array(
        1 => 'One',
        2 => 'Two',
        3 => 'Three',
    )
);
 
/*
Output:
<label class="baz" for="foo-1">
    One<input type="checkbox" name="foo[]" id="foo-1" value="1" />
</label>
<br />
<label class="baz" for="foo-2">
    Two<input type="checkbox" name="foo[]" id="foo-2" value="2" checked="checked" />
</label>
<br />
<label class="baz" for="foo-3">
    Three<input type="checkbox" name="foo[]" id="foo-3" value="3" />
</label>
*/

########################################
echo'<br><br><br>';
 

 /**
     * Generates 'select' list of options.
     *
     * @access public
     *
     * @param string|array $name If a string, the element name.  If an
     * array, all other parameters are ignored, and the array elements
     * are extracted in place of added parameters.
     *
     * @param mixed $value The option value to mark as 'selected'; if an
     * array, will mark all values in the array as 'selected' (used for
     * multiple-select elements).
     *
     * @param array|string $attribs Attributes added to the 'select' tag.
     *
     * @param array $options An array of key-value pairs where the array
     * key is the radio value, and the array value is the radio text.
     *
     * @param string $listsep When disabled, use this list separator string
     * between list values.
     *
     * @return string The select tag and options XHTML.
     */
    ///  public function formSelect(String $name, $value = null, $attribs = null,
    ///    $options = null, $listsep = "<br />\n")
echo $this->formSelect(
    'foo',                         // nazwa 
    array(                         // jakie pola bendą zaznaczone
        1,
        2,
    ),
    array(
        'multiple' => true,
    ),
    array(
        1 => 'One',
        2 => 'Two',
        3 => 'Three',
    )
);
 
/*
Output:
<select name="foo[]" id="foo" multiple="multiple">
    <option value="1" label="One" selected="selected">One</option>
    <option value="2" label="Two" selected="selected">Two</option>
    <option value="3" label="Three">Three</option>
</select>
*/


?>